import Vue 			from "vue";
import global 		from "../../api/api.js";
import Session 		from "../../store/sessionStore";
import Types from "../mutation-types";
import { requestCallBackHandler } from '../store'
/**
 * author:　Luisa
 * get the system all config
 * @param  {[type]} options.dispatch [description]
 * @param  {String} type             类型
 * @return {[type]}                  [description]
 */
export const getSystemConfig = ({dispatch}) => {
	let url =  global.api.getsystemconfig,
	    xrH;

	xrH = Vue.http.post({
		url: url,
		method:'post'
	}).then(function(response){
		response.type=Types.GET_SYSTEM_CONFIG;
		requestCallBackHandler(response)
	});
	return xrH;
}
